<?php 
header("Content-type: text/html; charset=utf-8");
$pasts=glob("./wenjian/*");
// var_dump($pasts);
// echo $_GET['info'];
include".././05_07/function.php";
// include"./fanye.php";
include"./index.php";
 ?>

<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<link href="../05_11/moban/Tpl/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
	<span style="color:red"><?php echo isset($_GET['info'])? $_GET['info'] :'';?></span>
	<form action="./obj.php" method="post" enctype="multipart/form-data">
	
		<input style="margin-left:500"  type="file"  multiple="multiple"  name="xbs[]" >
		<input style="margin-left:500"  type="submit"  value="上传文件">
	</form>

	<table class="table">
		<thead>
	        <tr>
	          <th>缩略图</th>
	          <th>个人文件名</th>
	          <th>文件大小</th>
	          <th>文件格式</th>
	          <th>上传时间</th>
	          <th>下载</th>
	          <th>删除</th>
	        </tr>
	      </thead>		
	   <?php foreach ($db as $v) {?>	
	    <tr>  <?php $tt=basename($v);$yy=explode(".", $tt); ?>
	    	  <th><img src="<?php echo $v; ?>" alt="" width="80" height="50"></th>
	          <th scope="row"><?php echo basename($v) ?></th>
	          <td><?php echo att(filesize($v)) ?></td>
	          
	          <td><?php echo end($yy) ?></td>
	          <td><?php echo aaa(filemtime($v)) ?></td>
	          <td><a href="./down.php?url=<?php echo $v ?>" ><span class="glyphicon glyphicon-download-alt" aria-hidden="true"></span></a>
	          </td>
	          <td><a href="./del.php?url=<?php echo $v ?>"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span></a></td>
        </tr>
	   <?php } ?>	
	   </table>	
		 <nav aria-label="...">
           <ul class="pagination">
	            <?php if ($p!=1) {?>
	              <li><a href="./upload1.php?p=<?php echo $p-1?>" aria-label="Previous"><span aria-hidden="true">上一页</span></a></li>
	           <?php }?>
	 
	               <?php for ($i=1; $i <=$page ; $i++) { ?>
	                 
	              <li class="<?php if ($p==$i) {
	                echo "active";
	              }   ?>">
	                <a href="./upload1.php?p=<?php echo $i ?>"><?php echo $i; ?>
	                      <span class="sr-only"></span>
	                </a>
	              </li>
	              <?php }?>
	               <?php if($p!=$page){?>
	                <li>
	                  <a href="./upload1.php?p=<?php echo $p+1?>" aria-label="Next">
	                    <span aria-hidden="true">
	                           下一页
	                    </span>
	                  </a>
	                </li>
	               <?php }?>         
           </ul>
         </nav>
</body>
</html>